#include <cstdio>
#include <algorithm>

using namespace std;

namespace my {
    const int maxn=500000, maxk=18;

    int gcd(int a, int b) {
        for (int r=a%b; r; a=b, b=r, r=a%b);
        return b;
    }

    int n, log[maxn+1], a[maxn+1], gv[maxn+1][maxk+1];

    void initLog(int n) {
        log[1] = 0;
        for (int i=2; i<=n; i++) log[i] = log[i>>1]+1;
    }

    void makeST(int n, int a[], int v[][maxk+1], int f(int a, int b)) {
        for (int i=1; i<=n; i++) v[i][0] = a[i];

        for (int i=1; i<=log[n]; i++) {
            for (int x=1; x<=n; x++) {
                if (x+(1<<i)-1<=n) {
                    int y=x+(1<<(i-1));
                    v[x][i] = f(v[x][i-1], v[y][i-1]);
                }
            }
        }
    }

    int get(int l, int r, int v[][maxk+1], int f(int a, int b)) {
        int len=log[r-l+1];
        return f(v[l][len], v[r-(1<<len)+1][len]);
    }

    int findLeft(int o) {
        int ret=0;
        for (int l=1, r=o, mid; l<=r; ) {
            mid=(l+r)/2;
            if (get(mid, o, gv, gcd)==a[o]) {
                r = mid-1;
                ret = mid;
            } else l = mid+1;
        }
        return ret;
    }

    int findRight(int o) {
        int ret=0;
        for (int l=o, r=n, mid; l<=r; ) {
            mid=(l+r)/2;
            if (get(o, mid, gv, gcd)==a[o]) {
                l = mid+1;
                ret = mid;
            } else r = mid-1;
        }
        return ret;
    }

    int main() {
        freopen("interval.in", "r", stdin);
        freopen("interval.out", "w", stdout);

        scanf("%d", &n);
        initLog(n);
        for (int i=1; i<=n; i++) scanf("%d", a+i);
        makeST(n, a, gv, gcd);

        static int ans[maxn+1];
        static bool book[maxn+1];
        int ansl=0;
        for (int i=1; i<=n; i++) {
            int l=findLeft(i), r=findRight(i);
            if (r-l>ansl) {
                ansl = r-l;
                ans[0] = 0;
            }
            if (r-l==ansl && !book[l]) {
                ans[++ans[0]] = l;
                book[l] = true;
            }
        }

        sort(ans+1, ans+ans[0]+1);
        printf("%d %d\n", ans[0], ansl);
        for (int i=1; i<=ans[0]; i++) printf("%d ", ans[i]);
        printf("\n");

        fclose(stdin);
        fclose(stdout);
        return 0;
    }
};

int main() {return my::main();}
